<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link href="<%=path%>/pattern/cm/css/list_public_short.css"
			type="text/css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css"
			href="<%=path%>/pattern/flexigrid/css/flexigrid/flexigrid.css">
		<script type="text/javascript"
			src="<%=path%>/pattern/jquery-ui-1.7.1.custom/js/jquery-1.3.2.min.js"></script>
		<script type="text/javascript"
			src="<%=path%>/pattern/flexigrid/flexigrid.js"></script>
		<script src="<%=path%>/pattern/cm/js/list_public_short2.js"
			language="javascript" type="text/javascript"></script>
<script type="text/javascript">


	function shownumber(){
	var xmlhttp;
		if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
			xmlhttp = new XMLHttpRequest();
		} else {// code for IE6, IE5
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
				document.getElementById("number").innerHTML=xmlhttp.responseText;
			}
		}
		xmlhttp.open("POST", "compare.action", true);
		xmlhttp.send();
	}
</script>
		<title>无标题文档</title>
	</head>
	<body>

		<div id="layout">
			<div class="title">
				长度为8的频繁串
			</div>

			<div class="list" id="list">
				<form name="data" method="post">
					<table class="flexme1">
						<thead>
							<tr>
								<th width="40">
									标记
								</th>
								<th width="285">
									值
								</th>
								<th width="70">
									次数
								</th>
								<th width="70">
									长度
								</th>
								<th width="68">
									操作
								</th>

							</tr>
						</thead>
						<tbody>
							<c:forEach items="${list}" var="entity">
								<tr>
									<td align="center">
										<input type="checkbox" value="${entity.id }">
									</td>
									<td align="center">
										${entity.value}
									</td>
									<td align="center">
										${entity.count}
									</td>
									<td align="center">
										${entity.length}
									</td>

									<td align="center">
										&nbsp;
										<s:if test="#session.type == 'admin'">
											<a
												href="<%=path%>/frequentInfo.action?type=delete&ids=${entity.id}">删除</a>
										</s:if>
										&nbsp;&nbsp;

									</td>

								</tr>
							</c:forEach>

						</tbody>
					</table>
				</form>
			</div>
			<div class="bottom">
				<div class="pageup"
					onclick="window.location.href='<%=basePath%>frequentLengthList.action?length=8&currentPage=${previousPage}'"></div>
				<div id="pages">
					${currentPage} of ${totalPages}
				</div>
				<div class="pagedown"
					onclick="window.location.href='<%=basePath%>frequentLengthList.action?length=8&currentPage=${nextPage}'"></div>
				<div id="records">
					共有 ${totalRows} 条记录
				</div>
				<div class="clear"></div>
			</div>
		</div>
		<div class="tiao">
			<img src="<%=path%>/pattern/cm/theme/images/tiao1.png">
		</div>
		<div class="chart">
			<img alt="8位长度平凡串" src="<%=path%>/frequentPieChart.action?length=8">
		</div>
		<div class="fenge">
			<img alt="华丽的分割线" src="<%=path%>/pattern/cm/theme/images/fenge3.png">
		</div>
		<div class="chart2">
			<img alt="8位长度平凡串" src="<%=path%>/frequentBarChart.action?length=8">
		</div>
		<div style="position: fixed; left: 0px; top: 450px;height:220px;OVERFLOW-y:auto;">
		 <input type="button" onclick="shownumber()" value="查看对比"/>
		 <div id="number"></div>
		</div>
	</body>
</html>
